import request from '@/utils/request'

// 查询题库分类列表
export function listQuestionCategory(query) {
  return request({
    url: '/exam/questionCategory/list',
    method: 'get',
    params: query
  })
}

// 查询题库分类所有列表
export function listAllQuestionCategory(query) {
  return request({
    url: '/exam/questionCategory/listAll',
    method: 'get',
    params: query
  })
}

// 查询题库分类详细
export function getQuestionCategory(categoryId) {
  return request({
    url: '/exam/questionCategory/getInfo/' + categoryId,
    method: 'get'
  })
}

// 新增题库分类
export function addQuestionCategory(data) {
  return request({
    url: '/exam/questionCategory/add',
    method: 'post',
    data: data
  })
}

// 修改题库分类
export function updateQuestionCategory(data) {
  return request({
    url: '/exam/questionCategory/edit',
    method: 'post',
    data: data
  })
}

// 删除题库分类
export function delQuestionCategory(categoryId) {
  return request({
    url: '/exam/questionCategory/remove/' + categoryId,
    method: 'get'
  })
}
